public class Main {
    public static void main(String[] args) {
        int[] arrays=new int[]{1,2,3,4};
        arrays[2]=10;
        System.out.println(arrays[1]);//打印元素
        System.out.println(arrays[2]);//修改元素
        System.out.println(arrays[4]);//越界访问
    }
}
